﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;

namespace LeanEngine.Reflection
{
    public static class ReflectionFactories
    {
        #region Constructor Members

        static ReflectionFactories()
        {
            MethodInvokerFactory = new MethodInvokerFactory();
            PropertyAccessorFactory = new PropertyAccessorFactory();
            FieldAccessorFactory = new FieldAccessorFactory();
            ConstructorInvokerFactory = new ConstructorInvokerFactory();
            EmitConstructorInvokerFactory = new EmitConstructorInvokerFactory();
        }

        #endregion

        #region PropertyInfo Members

        public static IReflectionFactory<MethodInfo, IMethodInvoker> MethodInvokerFactory { get; set; }

        public static IReflectionFactory<PropertyInfo, IPropertyAccessor> PropertyAccessorFactory { get; set; }

        public static IReflectionFactory<FieldInfo, IFieldAccessor> FieldAccessorFactory { get; set; }

        public static IReflectionFactory<ConstructorInfo, IConstructorInvoker> ConstructorInvokerFactory { get; set; }

        public static IReflectionFactory<Type, IConstructorInvoker> EmitConstructorInvokerFactory { get; set; }

        #endregion
    }
}
